﻿using Furion.DatabaseAccessor;
using System;
using System.ComponentModel.DataAnnotations;

namespace Pear.Core
{
    /// <summary>
    /// 社交信息表（博客）
    /// </summary>
    public class SocialInfo : Entity<int>
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public SocialInfo()
        {
            CreatedTime = DateTime.Now;
            IsDeleted = false;
        }

        /// <summary>
        /// 社交标题（gitee,github,qq等）
        /// </summary>
        [Required, MaxLength(64)]
        public string Title { get; set; }

        /// <summary>
        /// 对应前端Icon图标展示
        /// </summary>
        [MaxLength(32)]
        public string Icon { get; set; }

        /// <summary>
        /// 颜色
        /// </summary>
        [MaxLength(32)]
        public string Color { get; set; }

        /// <summary>
        /// 链接地址
        /// </summary>
        [MaxLength(128)]
        public string Href { get; set; }

        /// <summary>
        /// 用户Id
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// 多对一引用
        /// </summary>
        public User User { get; set; }
    }
}